[HVM] Revert cset 14083
authorTim Deegan <Tim.Deegan@xensource.com>
Mon, 26 Feb 2007 09:28:30 +0000 (09:28 +0000)
committerTim Deegan <Tim.Deegan@xensource.com>
Mon, 26 Feb 2007 09:28:30 +0000 (09:28 +0000)
which was wrong, and not very useful.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
xen/arch/x86/mm/shadow/multi.c
xen/include/asm-x86/p2m.h

index 837e34733c40f7d94b30749041ae981377f34ad0..248e90216be909d2e3c8037d6d68d27d6949d09f 100644 (file)
@@ -2394,8 +2394,7 @@ static int validate_gl1e(struct vcpu *v, void *new_ge, mfn_t sl1mfn, void *se)
     gfn = guest_l1e_get_gfn(*new_gl1e);
     gmfn = vcpu_gfn_to_mfn(v, gfn);
 
-    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && 
-            mmio_space(gfn_to_paddr(gfn)));
+    mmio = (is_hvm_vcpu(v) && paging_vcpu_mode_translate(v) && !mfn_valid(gmfn));
     l1e_propagate_from_guest(v, new_gl1e, _mfn(INVALID_MFN), gmfn, &new_sl1e, 
                              ft_prefetch, mmio);
     
index cf536b02481d36a3d49474b79c0b53ebcb0bf225..8ba23da3b5a706e3397ca34a9d3d6f8b3fcd7dda 100644 (file)
@@ -86,11 +86,11 @@ static inline unsigned long get_mfn_from_gpfn(unsigned long pfn)
     return mfn_x(gfn_to_mfn_current(pfn));
 }
 
-/* Is this guest address an mmio one? */
+/* Is this guest address an mmio one? (i.e. not defined in p2m map) */
 static inline int mmio_space(paddr_t gpa)
 {
-    return (gpa >= 0xf0000000 /* 256MB hole just below 4GB */
-            || (gpa >= 0xa0000 && gpa < 0xc0000)); /* VGA hole */
+    unsigned long gfn = gpa >> PAGE_SHIFT;
+    return !mfn_valid(mfn_x(gfn_to_mfn_current(gfn)));
 }
 
 /* Translate the frame number held in an l1e from guest to machine */